<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<style type="text/css">
			#father{
				width: 100%;
				height: 500px;
				display: flex;
				justify-content: center;
			}
			#hideimg{
				width: 600px;
				height: 500px;
				overflow: hidden;
			}
			#allimg{
				width: 1600px;
				display: flex;
				margin-top: 200px;
				justify-content: center;
			}
			#allimg img{
				width: 100px;
				height: 100px;
			}
		</style>
	</head>
	<body>
		<div id="father">
			<div id="hideimg">
				<div id="allimg" onmouseenter="aa();" onmouseleave="bb();">
					<img src="img/滚动图片/1.jpeg" >
					<img src="img/滚动图片/2.jpeg" >
					<img src="img/滚动图片/3.jpeg" >
					<img src="img/滚动图片/4.jpeg" >
					<img src="img/滚动图片/5.jpeg" >
					<img src="img/滚动图片/6.jpeg" >
					<img src="img/滚动图片/7.jpeg" >
					<img src="img/滚动图片/8.jpeg" >
					<img src="img/滚动图片/9.jpeg" >
					<img src="img/滚动图片/10.jpeg">
					<img src="img/滚动图片/1.jpeg" >
					<img src="img/滚动图片/2.jpeg" >
					<img src="img/滚动图片/3.jpeg" >
					<img src="img/滚动图片/4.jpeg" >
					<img src="img/滚动图片/5.jpeg" >
					<img src="img/滚动图片/6.jpeg" >
				</div>
			</div>
		</div>
	</body>
	<script type="text/javascript">
		newallimg = document.getElementById('allimg');
		var newleft = 0;
		var myinteral= null;
		function doAction(){
				if (newleft == -1000) {
						newleft =0;
				}
				newleft--;
				newallimg.style.marginLeft=newleft+'px';
				if(newleft%100==0){
					clearInterval(myinteral);
					mytimeout = setTimeout(function(){
						myinteral = setInterval(doAction,25);
					},1000)
				}
		}
		function aa(){
			clearInterval(mytimeout);
			clearInterval(myinteral);
		}
		function bb(){
			myinteral = setInterval(doAction,25);
		}
		onload = function(){
			myinteral = setInterval(doAction,25)
		}
	</script>
</html>
